package com.joven.shelltest.test;

import com.joven.shelltest.utils.mybatisplusdim.AnalyzerUtil;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 分词ik测试
 * @Author wzj
 * @Date 2023-10-08 15:37
 **/
public class OtherTest10 {
    public static void main(String[] args) {
//        String str = String.format("不动产权证书号：330803001012GB01196F00060059%n %n抵押方式：一般抵押%n %n被担保主债权数额：85000%n %n债务履行期限：20230914-20630915");
//        System.out.println(str);
//
//        String x1 = "joker";
//        String x2 = "\u001B[1mjoker\u001B[1m";
//        System.out.println(x1);
//        System.out.println(x2);

        String input = "今天是星期二，还没下班，还不能出去玩";
        String input2 = "方雷萍:身份证:330821199010193225,叶斌:身份证:330821198708101113";
        List<String> stringList = AnalyzerUtil.ikSegmentationList(input, 2);
        List<String> stringList2 = AnalyzerUtil.partSegmentationList(input2, 18);
        System.out.println(stringList);
        System.out.println(stringList.size());

//        String ids = "方雷萍:身份证:330821199010193225,叶斌:身份证:330821198708101113";
//        String[] filters = ids.split(":");
//        List<String> result = new ArrayList<>(Arrays.asList(filters));
//        for (String s : filters) {
//            if (s.contains(",")) {
//                String[] other = s.split(",");
//                result.addAll(Arrays.asList(other));
//            }
//        }
//        List<String> filterResults = result.stream().filter(s -> s.length() >= 18 && !s.contains(",")).collect(Collectors.toList());
//        filterResults.forEach(System.out::println);
    }
}
